package Ventanas;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;
import javax.swing.border.*;
import javax.swing.table.*;
import com.toedter.calendar.*;




/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
/**
 * @author lucas
 */
public class VentanaABMMedico extends JFrame {

	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}


	private void initComponents() {

		panelEspecialidad = new JPanel();
		cbxEspecialidades = new JComboBox();
		btnAgregar = new JButton();
		scrollPane1 = new JScrollPane();
		tblEspecialidades = new JTable();
		panelBotones = new JPanel();
		btnAceptar = new JButton();
		btnCancelar = new JButton();
		panelDatos = new JPanel();
		lblNombre = new JLabel();
		lblApellido = new JLabel();
		lblDireccion = new JLabel();
		lblTelefono = new JLabel();
		lblFechaNacimiento = new JLabel();
		lblMatricula = new JLabel();
		txtNombre = new JTextField();
		txtApellido = new JTextField();
		txtDireccion = new JTextField();
		txtTelefono = new JTextField();
		txtMatricula = new JTextField();
		btnConfigurarAgenda = new JButton();
		dcFechaNacimiento = new JDateChooser();
	
		//======== this ========
		{
			this.setTitle("ABM medico");
			this.setIconImage(new ImageIcon("/Seminario-Cliente/src/Images/mas.png").getImage());
			this.setAlwaysOnTop(true);
			this.setVisible(true);
			this.setResizable(false);
			Container thisContentPane = this.getContentPane();
			thisContentPane.setLayout(null);
	
			//======== panelEspecialidad ========
			{
				panelEspecialidad.setBorder(new TitledBorder("Seleccione la especialidad"));
				panelEspecialidad.setLayout(null);
	
				//---- cbxEspecialidades ----
				cbxEspecialidades.setModel(new DefaultComboBoxModel(new String[] {
					"Especialidad1"
				}));
				panelEspecialidad.add(cbxEspecialidades);
				cbxEspecialidades.setBounds(30, 21, 146, 21);
	
				//---- btnAgregar ----
				btnAgregar.setText("Agregar");
				btnAgregar.setIcon(new ImageIcon("C:\\Documents and Settings\\LUCAS\\Escritorio\\SEMINARIO I\\images\\a\u00f1adir.jpg"));
				panelEspecialidad.add(btnAgregar);
				btnAgregar.setBounds(210, 20, 115, 21);
	
				//======== scrollPane1 ========
				{
	
					//---- tblEspecialidades ----
					tblEspecialidades.setModel(new DefaultTableModel(
						new Object[][] {
							{"Especialidad1"},
							{null},
							{null},
							{null},
						},
						new String[] {
							"Especialidades"
						}
					));
					scrollPane1.setViewportView(tblEspecialidades);
				}
				panelEspecialidad.add(scrollPane1);
				scrollPane1.setBounds(30, 55, 295, 84);

				{ // compute preferred size
					Dimension preferredSize = new Dimension();
					for(int i = 0; i < panelEspecialidad.getComponentCount(); i++) {
						Rectangle bounds = panelEspecialidad.getComponent(i).getBounds();
						preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
						preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
					}
					Insets insets = panelEspecialidad.getInsets();
					preferredSize.width += insets.right;
					preferredSize.height += insets.bottom;
					panelEspecialidad.setMinimumSize(preferredSize);
				}
			}
			thisContentPane.add(panelEspecialidad);
			panelEspecialidad.setBounds(12, 229, 350, 164);
	
			//======== panelBotones ========
			{
				panelBotones.setLayout(null);
	
				//---- btnAceptar ----
				btnAceptar.setText("Aceptar");
				btnAceptar.setIcon(new ImageIcon("/Seminario-Cliente/src/Images/tildeOKpequeno.jpg"));
				btnAceptar.setMargin(new Insets(2, 5, 2, 5));
				panelBotones.add(btnAceptar);
				btnAceptar.setBounds(70, 25, 87, 26);
				btnAceptar.addActionListener(new ActionListener(){
							
							public void actionPerformed (ActionEvent paramActionEvent){
								//LLama a la funcion que da de guarda el medico
							}
						});
	
				//---- btnCancelar ----
				btnCancelar.setText("Cancelar");
				btnCancelar.setIcon(new ImageIcon("/Seminario-Cliente/src/Images/cruzCancelar.jpg"));
				btnCancelar.setMargin(new Insets(2, 5, 2, 5));
				panelBotones.add(btnCancelar);
				btnCancelar.setBounds(190, 25, 87, 26);
				{
					checkBajaMedico = new JCheckBox();
					panelBotones.add(checkBajaMedico);
					checkBajaMedico.setText("Dar de baja medico");
					checkBajaMedico.setBounds(6, 0, 120, 20);
				}
				btnCancelar.addActionListener(new ActionListener(){
							
							public void actionPerformed (ActionEvent paramActionEvent){
								dispose();
							}
						});
	
				{ // compute preferred size
					Dimension preferredSize = new Dimension();
					for(int i = 0; i < panelBotones.getComponentCount(); i++) {
						Rectangle bounds = panelBotones.getComponent(i).getBounds();
						preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
						preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
					}
					Insets insets = panelBotones.getInsets();
					preferredSize.width += insets.right;
					preferredSize.height += insets.bottom;
					panelBotones.setMinimumSize(preferredSize);
				}
			}
			thisContentPane.add(panelBotones);
			panelBotones.setBounds(12, 399, 355, 65);
	
			//======== panelDatos ========
			{
				panelDatos.setBorder(new TitledBorder("Datos M\u00e9dico"));
				panelDatos.setLayout(null);
	
				//---- lblNombre ----
				lblNombre.setText("Nombre");
				panelDatos.add(lblNombre);
				lblNombre.setBounds(new Rectangle(new Point(15, 27), lblNombre.getPreferredSize()));
	
				//---- lblApellido ----
				lblApellido.setText("Apellido");
				panelDatos.add(lblApellido);
				lblApellido.setBounds(172, 27, 70, lblApellido.getPreferredSize().height);
	
				//---- lblDireccion ----
				lblDireccion.setText("Direccion");
				panelDatos.add(lblDireccion);
				lblDireccion.setBounds(15, 57, 65, lblDireccion.getPreferredSize().height);
	
				//---- lblTelefono ----
				lblTelefono.setText("Telefono");
				panelDatos.add(lblTelefono);
				lblTelefono.setBounds(172, 57, 65, lblTelefono.getPreferredSize().height);
	
				//---- lblFechaNacimiento ----
				lblFechaNacimiento.setText("Fecha de nacimiento");
				panelDatos.add(lblFechaNacimiento);
				lblFechaNacimiento.setBounds(15, 100, 125, lblFechaNacimiento.getPreferredSize().height);
	
				//---- lblMatricula ----
				lblMatricula.setText("Matr\u00edcula");
				panelDatos.add(lblMatricula);
				lblMatricula.setBounds(15, 140, 65, lblMatricula.getPreferredSize().height);
				panelDatos.add(txtNombre);
				txtNombre.setBounds(72, 25, 90, txtNombre.getPreferredSize().height);
				panelDatos.add(txtApellido);
				txtApellido.setBounds(235, 25, 90, txtApellido.getPreferredSize().height);
				panelDatos.add(txtDireccion);
				txtDireccion.setBounds(72, 55, 90, txtDireccion.getPreferredSize().height);
				panelDatos.add(txtTelefono);
				txtTelefono.setBounds(235, 55, 90, txtTelefono.getPreferredSize().height);
				panelDatos.add(txtMatricula);
				txtMatricula.setBounds(72, 138, 90, txtMatricula.getPreferredSize().height);
	
				//---- btnConfigurarAgenda ----
				btnConfigurarAgenda.setText("Configurar Agenda");
				btnConfigurarAgenda.setIcon(new ImageIcon("C:\\Documents and Settings\\LUCAS\\Escritorio\\SEMINARIO I\\images\\modificar.png"));
				btnConfigurarAgenda.setMargin(new Insets(2, 0, 2, 0));
				btnConfigurarAgenda.addActionListener(new ActionListener(){
							
							public void actionPerformed (ActionEvent paramActionEvent){
								VentanaCargarAgenda vent= new VentanaCargarAgenda();
								vent.setVisible(true);
							}
						});
				panelDatos.add(btnConfigurarAgenda);
				btnConfigurarAgenda.setBounds(180, 138, 151, 28);
				panelDatos.add(dcFechaNacimiento);
				dcFechaNacimiento.setBounds(156, 98, 125, dcFechaNacimiento.getPreferredSize().height);
				{
					jLabel1 = new JLabel();
					panelDatos.add(jLabel1);
					jLabel1.setText("Nombre:");
					jLabel1.setBounds(23, 33, 47, 16);
				}
				{
					jLabel2 = new JLabel();
					panelDatos.add(jLabel2);
					jLabel2.setText("Direccion:");
					jLabel2.setBounds(17, 61, 53, 16);
				}
				{
					jLabel3 = new JLabel();
					panelDatos.add(jLabel3);
					jLabel3.setText("Fecha de Nacimiento:");
					jLabel3.setBounds(13, 100, 115, 16);
				}
				{
					jLabel4 = new JLabel();
					panelDatos.add(jLabel4);
					jLabel4.setText("Apellido:");
					jLabel4.setBounds(189, 32, 47, 16);
				}
				{
					jLabel5 = new JLabel();
					panelDatos.add(jLabel5);
					jLabel5.setText("Telefono:");
					jLabel5.setBounds(186, 60, 50, 16);
				}
				{
					jTextField1 = new JTextField();
					panelDatos.add(jTextField1);
					jTextField1.setBounds(73, 33, 95, 22);
				}
				{
					jTextField2 = new JTextField();
					panelDatos.add(jTextField2);
					jTextField2.setBounds(73, 61, 95, 22);
				}
				{
					jTextField3 = new JTextField();
					panelDatos.add(jTextField3);
					jTextField3.setBounds(239, 29, 84, 22);
				}
				{
					jTextField4 = new JTextField();
					panelDatos.add(jTextField4);
					jTextField4.setBounds(239, 57, 84, 23);
				}
				{
					ComboBoxModel ComboDiaModel = 
						new DefaultComboBoxModel(
								new String[] { "Item One", "Item Two" });
					ComboDia = new JComboBox();
					panelDatos.add(ComboDia);
					ComboDia.setModel(ComboDiaModel);
					ComboDia.setBounds(132, 97, 24, 22);
				}
				{
					ComboBoxModel comboMesModel = 
						new DefaultComboBoxModel(
								new String[] { "Item One", "Item Two" });
					comboMes = new JComboBox();
					panelDatos.add(comboMes);
					comboMes.setModel(comboMesModel);
					comboMes.setBounds(162, 97, 24, 22);
				}
				{
					ComboBoxModel comboAnioModel = 
						new DefaultComboBoxModel(
								new String[] { "Item One", "Item Two" });
					comboAnio = new JComboBox();
					panelDatos.add(comboAnio);
					comboAnio.setModel(comboAnioModel);
					comboAnio.setBounds(198, 97, 105, 22);
				}
				{
					jLabel6 = new JLabel();
					panelDatos.add(jLabel6);
					jLabel6.setText("Matricula:");
					jLabel6.setBounds(17, 143, 53, 16);
				}
				{
					jTextField5 = new JTextField();
					panelDatos.add(jTextField5);
					jTextField5.setBounds(73, 140, 70, 22);
				}

				{ // compute preferred size
					Dimension preferredSize = new Dimension();
					for(int i = 0; i < panelDatos.getComponentCount(); i++) {
						Rectangle bounds = panelDatos.getComponent(i).getBounds();
						preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
						preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
					}
					Insets insets = panelDatos.getInsets();
					preferredSize.width += insets.right;
					preferredSize.height += insets.bottom;
					panelDatos.setMinimumSize(preferredSize);
				}
			}
			thisContentPane.add(panelDatos);
			panelDatos.setBounds(17, 33, 340, 175);
			{
				radioModificar = new JRadioButton();
				thisContentPane.add(radioModificar);
				radioModificar.setText("Editar datos del medico");
				radioModificar.setBounds(17, 9, 142, 20);
			}

			{ // compute preferred size
				Dimension preferredSize = new Dimension();
				for(int i = 0; i < thisContentPane.getComponentCount(); i++) {
					Rectangle bounds = thisContentPane.getComponent(i).getBounds();
					preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
					preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
				}
				Insets insets = thisContentPane.getInsets();
				preferredSize.width += insets.right;
				preferredSize.height += insets.bottom;
				thisContentPane.setMinimumSize(preferredSize);
				thisContentPane.setPreferredSize(preferredSize);
			}
			this.pack();
			this.setSize(384, 490);
			this.setLocationRelativeTo(null);
		}
	}

	private JPanel panelEspecialidad;
	private JComboBox cbxEspecialidades;
	private JButton btnAgregar;
	private JScrollPane scrollPane1;
	private JTable tblEspecialidades;
	private JPanel panelBotones;
	private JButton btnAceptar;
	private JButton btnCancelar;
	private JPanel panelDatos;
	private JLabel lblNombre;
	private JLabel lblApellido;
	private JLabel lblDireccion;
	private JLabel lblTelefono;
	private JLabel lblFechaNacimiento;
	private JLabel lblMatricula;
	private JTextField txtNombre;
	private JTextField txtApellido;
	private JTextField txtDireccion;
	private JTextField txtTelefono;
	private JTextField txtMatricula;
	private JButton btnConfigurarAgenda;
	private JCheckBox checkBajaMedico;
	private JRadioButton radioModificar;
	private JTextField jTextField5;
	private JLabel jLabel6;
	private JComboBox comboAnio;
	private JComboBox comboMes;
	private JComboBox ComboDia;
	private JTextField jTextField4;
	private JTextField jTextField3;
	private JTextField jTextField2;
	private JTextField jTextField1;
	private JLabel jLabel5;
	private JLabel jLabel4;
	private JLabel jLabel3;
	private JLabel jLabel2;
	private JLabel jLabel1;
	private JDateChooser dcFechaNacimiento;
}
